package com.imooc.ecommerce.controller;

import com.imooc.ecommerce.service.SleuthTraceInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 打印跟踪信息
 * @Author: zhangshao
 * @Since: 2023/12/15 15:23
 */
@Slf4j
@RestController
@RequestMapping("/sleuth")
public class SleuthTraceInfoController {

	@Autowired
	private SleuthTraceInfoService traceInfoService;

	/**
	 * 打印日志跟踪信息
	 */
	@GetMapping("/trace-info")
	public void logCurrentTraceInfo(){
		traceInfoService.logCurrentTraceInfo();

	}


}
